package com.gxa.modules.communityManagement.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gxa.modules.communityManagement.form.HouseholdManagementForm;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@TableName("p_household_management")
public class HouseholdManagement implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    private String community;
    private String tower;
    private String unit;
    @TableField("serial_no")
    private String serialNo;
    private String name;
    private String sex;
    private String type;
    private String state;
    @TableField("house_state")
    private String houseState;

    private String ptime;
    @TableField("certificate_type")
    private String certificateType;
    @TableField("identification_number")
    private String identificationNumber;
    @TableField("phone_number")
    private String phoneNumber;
    @TableField("certificate_front")
    private String certificateFront;
    @TableField("certificate_back")
    private String certificateBack;
    @TableField("head_portrait")
    private String headPortrait;
    private String relationships;
    private String note;
    private String room;
    @TableField("community_id")
    private Integer communityId;

    public HouseholdManagement(HouseholdManagementForm householdManagementForm) {
        this.id = householdManagementForm.getId();
        this.serialNo = householdManagementForm.getSerialNo();
        this.headPortrait=householdManagementForm.getHeadPortrait();
        this.community=householdManagementForm.getCommunity();
        this.ptime=householdManagementForm.getPtime();
        this.tower=householdManagementForm.getTower();
        this.unit= householdManagementForm.getUnit();
        this.name = householdManagementForm.getName();
        this.sex=householdManagementForm.getSex();
        this.type = householdManagementForm.getType();
        this.state = householdManagementForm.getState();
        this.houseState = householdManagementForm.getHouseState();
        this.certificateType = householdManagementForm.getCertificateType();
        this.identificationNumber = householdManagementForm.getIdentificationNumber();
        this.phoneNumber = householdManagementForm.getPhoneNumber();
        this.certificateFront = householdManagementForm.getCertificateFront();
        this.certificateBack = householdManagementForm.getCertificateBack();
        this.relationships = householdManagementForm.getRelationships();
        this.note = householdManagementForm.getNote();
        this.room = householdManagementForm.getRoom();
        this.communityId = householdManagementForm.getCommunityId();
    }
}
